<?php	
	/*
	 *	Sample Module template for "OH"
	 *  
	 *  use for write develop module interface
	 *  to encampusulate opensource script into "OH"
	 */
	
	// Interface function	
	function oh_module_jsfunctions($tokens) {
		global $oh_object_jsfunctions;
		if (count($tokens)>0) {
			$jsf = "js_function_".$tokens[0];
			$jsf();			
		}
		return $oh_object_jsfunctions;	
	} 

	// Option file required
	require_once($oh['path']."/modules/jsfunctions/functions.js.php");
	
	// Main class of module
	class oh_class_jsfunctions {		
		function oh_class_jsfunctions() {
		}
		function load($functions) {
			if (!is_array($functions)) {
				$functions = explode(",",$functions);				
			}
			foreach($functions as $jsf) {
				$jsf = "js_function_".trim($jsf);
				$jsf();			
			}
		}
	}
	
	// Main object of module
	global $oh_object_jsfunctions;
	$oh_object_jsfunctions = new oh_class_jsfunctions();
?>
